package main

import (
	"flag"
	"fmt"
)

/*
	解析命令行参数 方法一
	flag -ip 10.01.01.1 -port 3309
*/
var ip = flag.String("ip", "127.0.0.1", "give a ip")
var port = flag.String("port", "80", "give a port")

func main() {
	flag.Parse()
	fmt.Println(*ip)
	fmt.Println(*port)
	flag.PrintDefaults()
}
